package com.tjmc.recruit.finance.api.feign;

import com.tjmc.recruit.common.core.constant.SecurityConstants;
import com.tjmc.recruit.common.core.constant.ServiceNameConstants;
import com.tjmc.recruit.common.core.util.R;
import com.tjmc.recruit.finance.api.entity.PlatformUserAccountEntity;
import com.tjmc.recruit.finance.api.entity.UsageRecordsEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * 消费记录远程调用
 */
@FeignClient(contextId = "usageRecordsService", value = ServiceNameConstants.FINANCE_SERVICE)
public interface RemoteUsageRecordsService {
    /**
     * 新增消费记录
     * @param usageRecords 消费记录信息
     * @param from
     * @return
     */
    @PostMapping("/usageRecords")
    R add(@RequestBody UsageRecordsEntity usageRecords, @RequestHeader(SecurityConstants.FROM) String from);
}
